package Entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
@Entity
@DiscriminatorValue("COMBO")
public class Entity_RecetaCombo extends Entity_Receta implements Serializable {
	private static final long serialVersionUID = 1L;
	@ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST,
			CascadeType.MERGE })
	@JoinTable(name = "RecetaCombo", joinColumns = 
	@JoinColumn(name = "id_receta", referencedColumnName = "id_receta"), 
	inverseJoinColumns =
	@JoinColumn(name = "sub_id_receta", referencedColumnName = "id_receta"))
	private List<Entity_Receta> recetas;

	public List<Entity_Receta> getRecetas() {
		return recetas;
	}

	public void setRecetas(List<Entity_Receta> recetas) {
		this.recetas = recetas;
	}
	
	
	

}
